Options and global configuration

There are local and global options. Local options are specified as arguments via the command line or as ToolTypes when started from the Workbench.
The global configuration file is "S:WHDLoad.prefs". It is a usual ASCII file and contains one option per line. Empty lines and comments are ignored. A comment is line based, starts with the character ";" and goes up to the end of line.
An example configuration file is contained in the developer package ("S/WHDLoad.prefs").

Overview

List of available options

Name of optionTypeLocalGlobalDefault value
BranchCacheswitcherx-
ButtonWaitswitcherxx
Cacheswitcherx-
Chkswitcherx-
ChkBltHogswitcherx-
ChkBltSizeswitcherx-
ChkBltWaitswitcherx-
ChkColBstswitcherx-
ChipNoCacheswitcherxx
CoreDumpswitcherx-
CoreDumpPathstring-xPROGDIR:
Custom1numericalx-
Custom2numericalx-
Custom3numericalx-
Custom4numericalx-
Custom5numericalx-
Dswitcherx-
DebugKeynumericalxx-
DCacheswitcherx-
ExecuteCleanupstring-x-
ExecuteStartupstring-x-
Expertswitcher-x
FileLogswitcherx-
FreezeKeynumericalxx$5d
MMUswitcherxx
NoAutoVecswitcherxx
NoCacheswitcherx-
NoFileCacheswitcherx-
NoFilterswitcherxx
NoFlushMemswitcherxx
NoMMUswitcherxx
NoTrapHandlerswitcherx-
NoVBRMoveswitcherx-
NoWriteCacheswitcherxx
NTSCswitcherxx
PALswitcherxx
Preloadswitcherx-
QuitKeynumericalxx-
ReadDelaynumerical-x0
RestartKeynumericalxx-
Slavestringx-WHDLoad.Slave
Snoopswitcherx-
SnoopAGAswitcherx-
SnoopECSswitcherx-
SnoopOCSswitcherx-
SplashDelaynumerical-x200
StoreBufferswitcherx-
SuperScalarswitcherx-
TimeOutnumericalx-0
WriteDelaynumericalxx150

Types of options

numerical: the value of the option is an integer,
on the command line you must use decimal notation, as ToolType you can also use hexadecimal notation indicated by a leading "$"
string: the value of the option is a string
switcher: option will be enabled if specified (boolean)

Example

Workbench:
CLI or Shell: 1> WHDLoad SuperGame.Slave PreLoad NTSC QuitKey=69 Custom1=1

Description of each Option

ButtonWait/S

This option does not affect WHDLoad itself, but can be tested by the Slave.
The meaning of this option is that if set, the users wants the installed program to wait for pressing a button when it shows pictures and/or plays music and normally it does this only for a very limited time (due to HD/RAM loading compared to slow disk loading).

BranchCache/S

This option enables the branch cache of the 68060. On other CPU-types it has no effect.
The option has no effect if NoCache/S is also set.

Cache/S

This option enables the instruction cache and disables the data cache for the installed program. If the MMU is used by WHDLoad it marks the Chip-Memory as Cacheable Writethrouh (impercise).
The option has no effect if NoCache/S is also set.

Chk/S

This option is a shortcut and enables the options ChkBltSize/S, ChkBltWait/S and ChkColBst/S.

ChkBltHog/S

This option checks that all the time the blthog (bltpri) bit in the custom.dmacon register is not set. That feature works only in conjuction with one of theSnoopOCS/SnoopECS/SnoopAGA options.

ChkBltSize/S

This option checks that the installed program does correcty use the blitter so that only allowed memory areas will be used. That feature works only in conjunction with one of the SnoopOCS/SnoopECS/SnoopAGA options.

ChkBltWait/S

This option checks that the installed program does correcty wait for the blitter to finish before starting a new blitter job. That feature works only in conjunction with one of the SnoopOCS/SnoopECS/SnoopAGA options.

ChkColBst/S

This option checks that all the time the color bit in the custom.bplcon0 register is set. That feature works only in conjunction with one of the SnoopOCS/SnoopECS/SnoopAGA options.

ChipNoCache/S

This option disables the cachebilty of the Chip-Memory (BaseMem). It should be used on hardware which does not allow the cachebility of Chip-Memory (e.g. PPC-boards) to avoid slowdowns of the execution speed of the installed program.

CoreDump/S

If selected, on every exit from an installed program, WHDLoad creates a memory and register dump. This may be useful to rip a music-module from the memory dump or for debugging.

CoreDumpPath

The destination directory for all dump files created by WHDLoad.

Custom1/K/N, Custom2/K/N, Custom3/K/N, Custom4/K/N, Custom5/K/N

These options are not used by WHDLoad itself, but can be tested by the Slave to control various Slave specific things.

DCache/S

This option enables the instruction and the data cache for the installed program. If the MMU is used by WHDLoad it marks the Chip-Memory as Cacheable Writethrouh (impercise).
The option has no effect if NoCache/S is also set.

D/S

This option helps to debug. If the option is enabled and a supported software freezer (Hrt/TK) is found in memory, WHDLoad simulates an NMI at execution of the first instruction contained in the Slave.

DebugKey/K/N

Sets the rawkey code to quit the program with debug (write coredump files and quit). This works only if the expert mode is active, if the VBR is moved by WHDLoad (NoVBRMove/S is not set and the cpu is at least a 68010) or the Slave itself supports it.

Expert/S

This option enables the expert mode of WHDLoad. Currently it affects the DebugKey/S feature and warnings during the switch between installed program and OS (color cycle copper screens). If expert mode is not active DebugKey/S is not available.

ExecuteCleanup

With this option a command can be specified which will executed by WHDLoad on exit.

ExecuteStartup

With this option a command can be specified which will executed by WHDLoad on startup. Can be used to disable hardware which makes problems in conjunction with WHDLoad, or to stop the TCP/IP stack or similar stuff.

FileLog/S

This option is only for debugging purposes. See chapter Dumps and Logfiles for more info.

FreezeKey/K/N

If you are using one of the supported software freezers (HrtMon or Thrillkill) you can use this option to setup a rawkey code on which pressed WHDLoad will enter the freezer. For this to work, the VBR must be moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) and the freezer must be active, the default key is $5d (grey '*' on the numerical keyblock).

MMU/S

This must be used on 68030 machines to get the MMU related features working (memory protection, improved cache managment, Snooping, resload_Protect#? functions). On 68040/060 this option has no effect because the MMU will be used by default. It is recommended to set this option in the global configuration file on all systems containing a 68030 with working MMU (i.e. not a 68ec030) because it increases stability and security a lot. If the option NoMMU/S is also set this option has no effect.

NoAutoVec/S

If selected WHDLoad will not quit if an unexpected autovector or NMI occurs (vectors #25-31 / $64-$7c). This should be used on systems/hardware which will create at random such interrupts to prevent WHDLoad from exiting (or better remove the broken hardware!).

NoCache/S

If selected all caches will be disabled.
This option overrides BranchCache/S, Cache/S, DCache/S, StoreBuffer/S and SuperScalar/S.

NoFileCache/S

Disables the file cache of WHDLoad and forces a switch to the OS for each disk operation of the installed program.
This option disables PreLoad/S.

NoFilter/S

Disables the audio filter. Note that this option only affects the initialisation at startup, if the installed program itself changes the state of the audio filter this option will be without effect.

NoFlushMem/S

Normally WHDLoad flushes the memory at startup to get as much free memory as possible for the PreLoad/S operation. That will remove all unused ressources like libraries, fonts etc. from memory. Using this option WHDLoad will not flush the memory. It may be used on systems with much free memory to improve system performance.

NoMMU/S

If this option is set WHDLoad will not use the MMU. This is a critical and dangerous option recommended only for testing or debugging and not for normal use. See chapter MMU for more info. The option overides MMU/S.

NoTrapHandler/S

If this option is enabled WHDLoad will use the original vector table from the OS which is active on starting WHDLoad, for the installed program, instead of creating its own vector table with which WHDLoad will catch all exceptions itself. This will only be useful for debugging purposes and should not be used for normal operation. Warning: if an exception handler called through the original vector table tries to call any OS function or tries to use OS data structures the machine will crash (e.g. exec.Alert).

NoVBRMove/S

By default WHDLoad moves the VBR to a different memory location from $0. This has the advantage that the installed program cannot change the vector table, which increases security and stability of WHDLoad greatly. Some installed programs/slaves will not correctly work with a moved VBR. The reason for this is that the installed program may do some strange stuff which is not supported by a moved VBR or the author of the install was too lame to support a moved VBR. In such a case, this option must be set to prevent WHDLoad from moving the VBR.
Another feature of the moved VBR is that WHDLoad can check the keyboard each time an Autovector interrupt occurs. With this check WHDLoad is able to terminate the installed program independently from the work of installed program/slave if QuitKey/S or DebugKey/S is pressed (similarly the installed program can be interrupted when FreezeKey/S is pressed). The VBR moving feature requires at least a 68010 to work. On a 68000 this option has no effect, because the VBR is always at $0 and cannot be moved.

NoWriteCache/S

This option disables the disk write cache feature of WHDLoad. Without this option WHDLoad will try to cache all write operations in memory and defer them until program exit to avoid unnecessary switches to the operating system.

NTSC/S

If selected, WHDLoad will use an NTSC display (60Hz) for the installed program. On a PAL Amiga, the NTSC monitor driver must be installed in DEVS:Monitors/.

PAL/S

If selected, WHDLoad will use a PAL display (50Hz) for the installed program. On an NTSC Amiga, the PAL monitor driver must be installed in DEVS:Monitors/.

Preload/S

If this option is enabled, WHDLoad will load as many files and disk images as possible into memory (depending on how much memory is free) at startup. This increases performance when the installed program is running, because it avoids switching to the OS to load data directly from the harddisk. This option should always be enabled.

QuitKey/K/N

Sets the rawkey code to quit the program, this works only if the VBR is moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) or the slave itself does support it.

Slave

Name of the slave which should be used by WHDLoad. The slave contains the interface code which is required for communication between the installed program and WHDLoad.

Snoop/S, SnoopAGA/S, SnoopECS/S, SnoopOCS/S

These options enables the Cia/Custom register snoop feature of WHDLoad.

ReadDelay/K/N

This option specifies the time in 1/50ths of a second that WHDLoad will wait after it has loaded data from disks, and will also wait this time after PreLoad has finished. This solves problems with drives (e.g. CD drives) which want do something after reading (e.g. switching the motor off).

RestartKey/K/N

Using this option you can setup a rawkey code on which pressed WHDLoad will restart the installed program.

SplashDelay/K/N

This option specifies the time in 1/50 seconds that WHDLoad shows the information window at startup. If SplashDelay/K/N is lower than ReadDelay/K/N it is ignored and the window is displayed using the time from ReadDelay/K/N. The window is displayed at least as long as Preload/S is working. If the option is set to 0 no window will be displayed.

StoreBuffer/S

This option enables the Store Buffer of the 68060. On other CPU-types it has no effect.
The option has no effect if NoCache/S is also set.

SuperScalar/S

This option enables ability of the 68060 to execute multiple instructions per machine cycle. On other CPU-types it has no effect.
The option has no effect if NoCache/S is also set.

TimeOut/K/N

If set lets WHDLoad and the installed program quit after the specified time. Requires that option NoVBRMove/S is not set and that the installed program does not modify the ciaa.ciatod timer. The time after to quit is specified in 1/50ths of a second. To measure that time for a demo or game enable option Expert/S and set a DebugKey/K/N, when the point you want to the quit the program is reached press the debug key. Now look into the created .whdl-register file and search the ciaa-event value. If your Power Supply Frequency is 50 Hz then it's the value you have to set with TimeOut/K/N, if the Frequency is 60 Hz you have to multiply the value with 5/6.

WriteDelay/K/N

This option specifies the time in 1/50 seconds that WHDLoad will wait after writing anything physically to disk. It affects all resload_Save#? functions and the FileLog/S feature. This makes sense because filesystems will not usually write data immedately to disk. It takes some time (1..3 sec) until all structures of the filesystem have been successfully updated. The default value for WriteDelay is 150 which lets WHDLoad wait 3 seconds after each write to the harddisk. You can set this value to 0, but then you should never exit by a reset from the installed program because saved data may not be written correctly to disk.